home *** CD-ROM | disk | FTP | other *** search
/ Aminet 19 / Aminet 19 (1997)(GTI - Schatztruhe)[!][Jun 1997].iso / Aminet / comm / cnet / time_clock.lha / timerclock / TimeClock < prev    next >
Text File  |  1997-03-13  |  6KB  |  100 lines

  1. /**************************************************************************\
  2.       $VER: Time Clock, v2.00 (14-Mar-97) by Dotoran of Frontiers!
  3. \**************************************************************************/
  4. options results;signal on SYNTAX;signal on ERROR;signal on IOERR
  5. a=sourceline(2);parse var a . ", "ver" ("vdate")" .
  6. tr=transmit;se=sendstring;gu=getuser
  7. a="rexxsupport.library";if ~show("l",a) then if ~addlib(a,0,-30) then exit
  8. parse source . . fp .;df=left(fp,max(lastpos('/',fp),lastpos(':',fp)))
  9.  
  10. v1="d e 9 f c"   /* Text, Colon, BIG #'s, :, A/PM - Current Time          */
  11. v2="d e 9 f c"   /* Text, Colon, BIG #'s, :, A/PM - Logon Time            */
  12. v3="d e b"       /* Text, Colon, BIG Number for Minutes Online            */
  13. v4="6 a e f b a" /* Text, YourCalls, SysCalls, TotText, BBSName, MinsLeft */
  14. v5="  "          /* Gutter Space between BIG characters.                  */
  15. te=1             /* Use Time Clock Extensions? (0=No,1=Yes)               */
  16.  
  17. parse var v1 c1 c2 c3 c4 c5 .; parse var v2 l1 l2 l3 l4 l5 .
  18. parse var v3 m1 m2 m3 .      ; parse var v4 t1 t2 t3 t4 t5 t6 .
  19. path=df ; gu 28 ; if result>1 then term=0 ; else term=1
  20. if term=0 then call ANSI ; else call ASCII
  21.  
  22. gu 57 ; l=subword(result,3) ; a=right(l,1) ; lap="" ; cntr=90
  23. if a="a" | a="p" then do ; lap="AM" ; l=left(l,length(l)-1)
  24.     cntr=96 ; if a="p" then lap="PM" ; end
  25. logon=l||lap ; gu 1200032 ; mins=result%10 ; gu 7 ; left=result%10
  26. gu 22 ; total=result ; gu 95 ; stotal=result
  27. bbsidentify name ; bbsname=result
  28. gu 12 ; t=subword(result,3) ; a=right(t,1) ; ap=""
  29. if a="a" | a="p" then do ; ap="AM" ; t=left(t,length(t)-1)
  30.     if a="p" then ap="PM" ; end
  31. time=t||ap ; time.="" ; logon.="" ; mins.=""
  32.  
  33. tr "f1Cc"c1"Current Timec"c2":"
  34. do i=1 to length(time) ; a=substr(time,i,1) ; a=index("0123456789:APM",a)-1
  35.     c="" ; if a<10 then c="c"c3 ; if a=10 then c="c"c4 ; if a>10 then c="c"c5
  36. do j=1 to 4+term ; time.j=time.j||c||n.a.term.j||v5 ; end j ; end i
  37. do i=1 to 4+term ; tr center(time.i,cntr) ; end i
  38.  
  39. tr "n1Cc"l1"Your Logon Timec"l2":"
  40. do i=1 to length(logon) ; a=substr(logon,i,1) ; a=index("0123456789:APM",a)-1
  41.     c="" ; if a<10 then c="c"l3 ; if a=10 then c="c"l4 ; if a>10 then c="c"l5
  42. do j=1 to 4+term ; logon.j=logon.j||c||n.a.term.j||v5 ; end j ; end i
  43. do i=1 to 4+term ; tr center(logon.i,cntr) ; end i
  44.  
  45. tr "n1Cc"m1"Minutes Onlinec"m2":c"m3
  46. do i=1 to length(mins) ; a=substr(mins,i,1) ; a=index("0123456789:APM",a)-1
  47. do j=1 to 4+term ; mins.j=mins.j||n.a.term.j||v5 ; end j ; end i
  48. do i=1 to 4+term ; tr center(mins.i,78) ; end i
  49.  
  50. se "n1>9c"t1"You've made c"t2||total" c"t1"of the c"t3||stotal
  51. tr " c"t4"Total Calls c"t1"to c"t5||bbsname"c"t1"..."
  52. tr "n1>9You have c"t6||left" c"t1"minutes left this call..."
  53. if te then se "@4#0"path"TimeClockE}"
  54. exit
  55.  
  56. ASCII:
  57.   n.0.1.1=" ##### ";n.0.1.2="#   ###";n.0.1.3="#  #  #";n.0.1.4="###   #";n.0.1.5=" ##### "
  58.   n.1.1.1=" ## ";n.1.1.2="### ";n.1.1.3=" ## ";n.1.1.4=" ## ";n.1.1.5="####"
  59.   n.2.1.1=" ##### ";n.2.1.2="##   ##";n.2.1.3="   ##  ";n.2.1.4="###    ";n.2.1.5="#######"
  60.   n.3.1.1=" ##### ";n.3.1.2="##   ##";n.3.1.3="   ### ";n.3.1.4="##   ##";n.3.1.5=" ##### "
  61.   n.4.1.1="##  ## ";n.4.1.2="##  ## ";n.4.1.3="#######";n.4.1.4="    ## ";n.4.1.5="    ## "
  62.   n.5.1.1="###### ";n.5.1.2="##     ";n.5.1.3="###### ";n.5.1.4="     ##";n.5.1.5="###### "
  63.   n.6.1.1="  #### ";n.6.1.2=" ##    ";n.6.1.3="###### ";n.6.1.4="##   ##";n.6.1.5=" ##### "
  64.   n.7.1.1="#######";n.7.1.2="     ##";n.7.1.3="    ## ";n.7.1.4="   ##  ";n.7.1.5="  ##   "
  65.   n.8.1.1=" ##### ";n.8.1.2="##   ##";n.8.1.3=" ##### ";n.8.1.4="##   ##";n.8.1.5=" ##### "
  66.   n.9.1.1=" ##### ";n.9.1.2="##   ##";n.9.1.3=" ######";n.9.1.4="    ## ";n.9.1.5=" ####  "
  67.   n.10.1.1="  ";n.10.1.2="##";n.10.1.3="  ";n.10.1.4="##";n.10.1.5="  "
  68.   n.11.1.1=" ##### ";n.11.1.2="##   ##";n.11.1.3="#######";n.11.1.4="##   ##";n.11.1.5="##   ##"
  69.   n.12.1.1="###### ";n.12.1.2="##   ##";n.12.1.3="###### ";n.12.1.4="##     ";n.12.1.5="##     "
  70.   n.13.1.1="###   ###";n.13.1.2="#### ####";n.13.1.3="## ### ##";n.13.1.4="##  #  ##";n.13.1.5="##     ##"
  71.  return
  72.  
  73. ANSI:
  74.   n.0.0.1=" ÜÜÜÜÜ ";n.0.0.2="ÛÛ  ÜÛÛ";n.0.0.3="ÛÛÜß ÛÛ";n.0.0.4="ßÛÜÜÜÛß"
  75.   n.1.0.1=" ÜÜ "   ;n.1.0.2="ßÛÛ "   ;n.1.0.3=" ÛÛ "   ;n.1.0.4="ÜÛÛÜ"
  76.   n.2.0.1=" ÜÜÜÜÜ ";n.2.0.2="ßß   ÛÛ";n.2.0.3="ÜÛßßßß ";n.2.0.4="ÛÛÜÜÜÜÜ"
  77.   n.3.0.1=" ÜÜÜÜÜ ";n.3.0.2="ßß   ÛÛ";n.3.0.3="   ßßÛÜ";n.3.0.4="ßÛÜÜÜÛß"
  78.   n.4.0.1="ÜÜ   ÜÜ";n.4.0.2="ÛÛ   ÛÛ";n.4.0.3=" ßßßßÛÛ";n.4.0.4="     ÛÛ"
  79.   n.5.0.1="ÜÜÜÜÜÜÜ";n.5.0.2="ÛÛÜÜÜÜ ";n.5.0.3="     ÛÛ";n.5.0.4="ßÛÜÜÜÛß"
  80.   n.6.0.1="  ÜÜÜ  ";n.6.0.2="ÜÛß    ";n.6.0.3="ÛÛßßßÛÜ";n.6.0.4="ßÛÜÜÜÛß"
  81.   n.7.0.1="ÜÜÜÜÜÜÜ";n.7.0.2="     ÛÛ";n.7.0.3="   ÜÛß ";n.7.0.4="  ÛÛ   "
  82.   n.8.0.1=" ÜÜÜÜÜ ";n.8.0.2="ÛÛ   ÛÛ";n.8.0.3="ÜÛßßßÛÜ";n.8.0.4="ßÛÜÜÜÛß"
  83.   n.9.0.1=" ÜÜÜÜÜ ";n.9.0.2="ÛÛ   ÛÛ";n.9.0.3=" ßßßßÛÛ";n.9.0.4="ßÛÜÜÜÛß"
  84.   n.10.0.1="  ";n.10.0.2="ÛÛ";n.10.0.3="ÜÜ";n.10.0.4="ßß"
  85.   n.11.0.1=" ÜÜÜÜÜ ";n.11.0.2="ÛÛ   ÛÛ";n.11.0.3="ÛÛßßßÛÛ";n.11.0.4="ÛÛ   ÛÛ"
  86.   n.12.0.1="ÜÜÜÜÜÜ ";n.12.0.2="ÛÛ   ÛÛ";n.12.0.3="ÛÛßßßß ";n.12.0.4="ÛÛ     "
  87.   n.13.0.1="ÜÜ     ÜÜ";n.13.0.2="ÛÛÛÜ ÜÛÛÛ";n.13.0.3="ÛÛ ßÛß ÛÛ";n.13.0.4="ÛÛ     ÛÛ"
  88.  return
  89.  
  90. CHECK:;if ARG() & ARG(1)~="###PANIC" then return ARG(1)
  91.   getcarrier;if result="TRUE" then if ARG() then return ARG(1);else return
  92.   logentry "Lost Carrier!!";bufferflush;exit
  93. SYNTAX:;ERROR:;IOERR:;e1="n1 Error: "rc" ("errortext(rc)")"
  94.   e2="  Line: "left(sigl,4)"File:";c="`"fp", "ver"'";e2=e2" "c;tr e1;tr e2
  95.   logentry e1;logentry e2;e=strip(translate(sourceline(sigl),"\{",""))
  96.   do while e~="";e3="Source: "left(e,37);tr e3;logentry e3;e=substr(e,38);end
  97.   bufferflush
  98. /**************************************************************************\
  99. \****************************************** Frontiers BBS (716)/823-9892 **/
  100.